Subject: Path Madness from Hell
From: "Joseph E. Van_Riper III" <[email-masked]>
To: [email-masked]
Date: Thu, 22 Jul 1993 14:03:30 -0400 (EDT)

I've been looking through the Includes and Autodocs for an easy
solution to my problem, but it looks hopeless.  Maybe one of you guys know
something I don't.

	I'm trying to write a program that may be called from either WB or CLI. 
I suppose, since I'm more familiar with working from the CLI, I find it easier
to program with that in mind.. certainly, there are less hassles <grin>.

	I want my program to call another program, with an argument, and print
any text it should decide to print to stdout.  I am keeping in mind that, from 
the WB, I have to WriteF('') to create a stdout for the program to use.

	Oddly enough, I/O is NOT my problem.  My problem is in determining a
path through which to search for the command.

	When run from CLI, the CLI's current path settings is passed to the new
process with either SystemTagList() or Execute() (note: I prefer SystemTagList
by far... much more flexibility than Execute, although it appears that Execute
works better with WB).

	But, when run from WB, the current path settings are NOT transferred to
the program (perhaps because Workbench doesn't have path settings, and can
therefore not give them to the process).

	As a result, any user who decides to use my program MUST specify an
exact path to the command they want to run in the tooltypes... they cannot rely
on a path to make things easier for them.  I find it somewhat difficult to
believe that there is no way to get a path from WorkBench; how does WB manage
to find commands specified in the icon (eg: if I have an icon with a default
tool of "amigaguide", it figures out that my copy of amigaguide is in the
sys:utilities directory, yet if my program, when run from workbench, tries to
Execute() or SystemTagList() 'amigaguide', it cannot figure out that the
command is in the sys:utilities directory).

	Any suggestions, or am I actually going to have to do a FindCli search
from 1 to MaxCli(), finding a CLI running Workbench, then peek into its path
thingy (ugly ugly ugly.. I don't wanna do it <bawl>)?

- Trey